<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="jquery-3.7.0.js"></script>
</head>
<body>
<script>
    location.href = "sum"
</script>
<!--<span id="num1"></span> + <span id="num2"></span> = <span id="res"></span>-->
<!--<script>-->
<!--    $().ready(function (){-->
<!--        $.ajax({-->
<!--            url: "num1",-->
<!--            dataType: "text",-->
<!--            success: function (data) {-->
<!--                $("#num1").text(data)-->
<!--            }-->
<!--        })-->

<!--        $.ajax({-->
<!--            url: "num2",-->
<!--            dataType: "text",-->
<!--            success: function (data){-->
<!--                $("#num2").text(data)-->
<!--            }-->
<!--        })-->

<!--        $.ajax({-->
<!--            url: "sum",-->
<!--            dataType: "text",-->
<!--            success: function (data){-->
<!--                $("#res").text(data)-->
<!--            }-->
<!--        })-->
<!--    })-->
<!--</script>-->
</body>
</html>